<?php

/**
 * Devolmvc filter form base class.
 *
 * @package    exproaqua
 * @subpackage filter
 * @author     Luis Hernández
 * @version    SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
 */
abstract class BaseDevolmvcFormFilter extends BaseFormFilterDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id_empresa'     => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'agencia'        => new sfWidgetFormFilterInput(),
      'ordentrab'      => new sfWidgetFormFilterInput(),
      'grupo'          => new sfWidgetFormFilterInput(),
      'subgrupo'       => new sfWidgetFormFilterInput(),
      'origen'         => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'codhijo'        => new sfWidgetFormFilterInput(),
      'nombre'         => new sfWidgetFormFilterInput(),
      'costopromfecha' => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'costounit'      => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'preciounit'     => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'dsctounit'      => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'dsctoprc'       => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'cantidad'       => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'cntdevuelt'     => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'tallas'         => new sfWidgetFormFilterInput(),
      'colores'        => new sfWidgetFormFilterInput(),
      'montoneto'      => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'montototal'     => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'almacen'        => new sfWidgetFormFilterInput(),
      'proveedor'      => new sfWidgetFormFilterInput(),
      'fechadoc'       => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
      'impuesto1'      => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'impuesto2'      => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'impuesto3'      => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'impuesto4'      => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'impuesto5'      => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'impuesto6'      => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'timpueprc'      => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'impu_mto'       => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'unidad'         => new sfWidgetFormFilterInput(),
      'cuentacont'     => new sfWidgetFormFilterInput(),
      'comision'       => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'comisprc'       => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'vendedor'       => new sfWidgetFormFilterInput(),
      'emisor'         => new sfWidgetFormFilterInput(),
      'usaserial'      => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'tipoprecio'     => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'agrupado'       => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'seimporto'      => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'desdeimpor'     => new sfWidgetFormFilterInput(),
      'notas'          => new sfWidgetFormFilterInput(),
      'oferta'         => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'compuesto'      => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'usaexist'       => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'marca'          => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'aux1'           => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'estacion'       => new sfWidgetFormFilterInput(),
      'integrado'      => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'referencia'     => new sfWidgetFormFilterInput(),
      'factor'         => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'baseimpo1'      => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'baseimpo2'      => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'baseimpo3'      => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'lote'           => new sfWidgetFormFilterInput(),
      'imp_nacional'   => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'imp_producc'    => new sfWidgetFormFilterInput(array('with_empty' => false)),
    ));

    $this->setValidators(array(
      'id_empresa'     => new sfValidatorPass(array('required' => false)),
      'agencia'        => new sfValidatorPass(array('required' => false)),
      'ordentrab'      => new sfValidatorPass(array('required' => false)),
      'grupo'          => new sfValidatorPass(array('required' => false)),
      'subgrupo'       => new sfValidatorPass(array('required' => false)),
      'origen'         => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'codhijo'        => new sfValidatorPass(array('required' => false)),
      'nombre'         => new sfValidatorPass(array('required' => false)),
      'costopromfecha' => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'costounit'      => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'preciounit'     => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'dsctounit'      => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'dsctoprc'       => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'cantidad'       => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'cntdevuelt'     => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'tallas'         => new sfValidatorPass(array('required' => false)),
      'colores'        => new sfValidatorPass(array('required' => false)),
      'montoneto'      => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'montototal'     => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'almacen'        => new sfValidatorPass(array('required' => false)),
      'proveedor'      => new sfValidatorPass(array('required' => false)),
      'fechadoc'       => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDate(array('required' => false)), 'to_date' => new sfValidatorDateTime(array('required' => false)))),
      'impuesto1'      => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'impuesto2'      => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'impuesto3'      => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'impuesto4'      => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'impuesto5'      => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'impuesto6'      => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'timpueprc'      => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'impu_mto'       => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'unidad'         => new sfValidatorPass(array('required' => false)),
      'cuentacont'     => new sfValidatorPass(array('required' => false)),
      'comision'       => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'comisprc'       => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'vendedor'       => new sfValidatorPass(array('required' => false)),
      'emisor'         => new sfValidatorPass(array('required' => false)),
      'usaserial'      => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'tipoprecio'     => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'agrupado'       => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'seimporto'      => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'desdeimpor'     => new sfValidatorPass(array('required' => false)),
      'notas'          => new sfValidatorPass(array('required' => false)),
      'oferta'         => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'compuesto'      => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'usaexist'       => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'marca'          => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'aux1'           => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'estacion'       => new sfValidatorPass(array('required' => false)),
      'integrado'      => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'referencia'     => new sfValidatorPass(array('required' => false)),
      'factor'         => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'baseimpo1'      => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'baseimpo2'      => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'baseimpo3'      => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'lote'           => new sfValidatorPass(array('required' => false)),
      'imp_nacional'   => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'imp_producc'    => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
    ));

    $this->widgetSchema->setNameFormat('devolmvc_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'Devolmvc';
  }

  public function getFields()
  {
    return array(
      'id_empresa'     => 'Text',
      'agencia'        => 'Text',
      'tipodoc'        => 'Text',
      'documento'      => 'Text',
      'ordentrab'      => 'Text',
      'grupo'          => 'Text',
      'subgrupo'       => 'Text',
      'origen'         => 'Number',
      'codigo'         => 'Text',
      'codhijo'        => 'Text',
      'pid'            => 'Text',
      'nombre'         => 'Text',
      'costopromfecha' => 'Number',
      'costounit'      => 'Number',
      'preciounit'     => 'Number',
      'dsctounit'      => 'Number',
      'dsctoprc'       => 'Number',
      'cantidad'       => 'Number',
      'cntdevuelt'     => 'Number',
      'tallas'         => 'Text',
      'colores'        => 'Text',
      'montoneto'      => 'Number',
      'montototal'     => 'Number',
      'almacen'        => 'Text',
      'proveedor'      => 'Text',
      'fechadoc'       => 'Date',
      'impuesto1'      => 'Number',
      'impuesto2'      => 'Number',
      'impuesto3'      => 'Number',
      'impuesto4'      => 'Number',
      'impuesto5'      => 'Number',
      'impuesto6'      => 'Number',
      'timpueprc'      => 'Number',
      'impu_mto'       => 'Number',
      'unidad'         => 'Text',
      'cuentacont'     => 'Text',
      'comision'       => 'Number',
      'comisprc'       => 'Number',
      'vendedor'       => 'Text',
      'emisor'         => 'Text',
      'usaserial'      => 'Number',
      'tipoprecio'     => 'Number',
      'agrupado'       => 'Number',
      'seimporto'      => 'Number',
      'desdeimpor'     => 'Text',
      'notas'          => 'Text',
      'oferta'         => 'Number',
      'compuesto'      => 'Number',
      'usaexist'       => 'Number',
      'marca'          => 'Number',
      'aux1'           => 'Number',
      'estacion'       => 'Text',
      'integrado'      => 'Number',
      'referencia'     => 'Text',
      'factor'         => 'Number',
      'baseimpo1'      => 'Number',
      'baseimpo2'      => 'Number',
      'baseimpo3'      => 'Number',
      'lote'           => 'Text',
      'imp_nacional'   => 'Number',
      'imp_producc'    => 'Number',
    );
  }
}
